package com.feeyo.groundservice.checkin.model

import androidx.compose.runtime.MutableState
import androidx.compose.runtime.mutableStateOf
import com.feeyo.groundservice.checkin.constant.isDuty
import com.squareup.moshi.Json

/**
 *作者：70893 on 2025-10-27
 *描述：
 */


data class CheckInPerSonBO(
    val uid: String,
    val username: String,
    val pinyin: String,
    val status: Int = 1,//0 停用 1可用
    private val stype: Int = 0,//看DutyType枚举
    @Json(ignore = true)//控制人员是否可用
    val enable: MutableState<Boolean> = mutableStateOf(status == 1),
) {
    val isDuty: Boolean
        get() = stype.isDuty()
}

internal data class CheckInUserBO(
    val uid: String,
    val truename: String,
)

//关联数据
internal data class LinkUserTaskBO(
    val user: CheckInPerSonBO,
    var task: CheckInTaskBO? = null,
)